Page({
  data: {
    notice: {}
  },
  onLoad(options) {
    const { id } = options
    this.getNoticeDetail(id)
  },
  //获取社区公告详情
  async getNoticeDetail(id) {
    if (!id) return
    const { data } = await wx.http.get(`/announcement/${id}`)
    this.setData({
      notice: data
    })
  }
})